% 用于将classify和LSMT的分类结果合并

%%
% 读入表格
[~,~,nlpbiao]=xlsread('unprolabelnlp.xlsx');
[~,~,classifybiao]=xlsread('classify.xlsx','classify');
[~,~,result]=xlsread('lastfenlei.xlsx');

%%
classifyid=classifybiao(:,1);
nlpid=nlpbiao(:,2);
for i=2:2358
    resultid=result{i,1};
    index=find(strcmp(classifyid,resultid));
    pnum=0;
    nnum=0;
    for j=1:length(index)
        if classifybiao{index(j),4}=='Positive'
            pnum=pnum+1;
        elseif classifybiao{index(j),4}=='Negative'
            nnum=nnum+1;
        end
    end
    index=find(strcmp(nlpid,resultid));
     for j=1:length(index)
        if nlpbiao{index(j),10}=='Positive ID'
            pnum=pnum+1;
        elseif nlpbiao{index(j),10}=='Negative ID'
            nnum=nnum+1;
        end
     end
    result{i,4}=pnum;
    result{i,6}=nnum;
end

%%
xlswrite('lastfenlei.xlsx',result);


